from django import forms


class AddingProductToCartForm(forms.Form):

    """ Форма для добвления продукта в корзину """

    QUANTITY_SELECTION = [(number, str(number)) for number in range(1, 21)]
    quantity = forms.TypedChoiceField(choices=QUANTITY_SELECTION, coerce=int)
    update_quantity = forms.BooleanField(required=False, initial=False, widget=forms.HiddenInput)
